package com.laxcen.basiclib.core.update.proxy.impl;

import com.laxcen.basiclib.core.update._Update;
import com.laxcen.basiclib.core.update.proxy.IUpdateProxy;

import static com.laxcen.basiclib.core.update.entity.UpdateError.ERROR.CHECK_NO_NEW_VERSION;

/**
 * 简单的版本更新代理
 */
public abstract class AbstractUpdateProxy implements IUpdateProxy {

    @Override
    public void onBeforeCheck() {

    }

    @Override
    public void onAfterCheck() {

    }

    @Override
    public void noNewVersion(Throwable throwable) {
        _Update.onUpdateError(CHECK_NO_NEW_VERSION, throwable != null ? throwable.getMessage() : null);
    }

}
